package com.zrb.mobile;

 

import com.zrb.applib.utils.AppSetting;
import com.zrb.mobile.ui.SystemBarTintManager;
 

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class BaseActivity  extends Activity  {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		 requestWindowFeature(Window.FEATURE_NO_TITLE); 
 		/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
			setTranslucentStatus(true);
		}
 
		SystemBarTintManager tintManager = new SystemBarTintManager(this);
		tintManager.setStatusBarTintEnabled(true);
		tintManager.setStatusBarTintResource(R.color.title_bg);//通知栏所需颜色
*/	}
	
	 @Override
	  protected  void onRestoreInstanceState(Bundle savedInstanceState)
      {
		super.onRestoreInstanceState(savedInstanceState);
		 

      } 

 
		@TargetApi(19) 
		private void setTranslucentStatus(boolean on) {
			Window win = getWindow();
			WindowManager.LayoutParams winParams = win.getAttributes();
			final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
			if (on) {
				winParams.flags |= bits;
			} else {
				winParams.flags &= ~bits;
			}
			win.setAttributes(winParams);
		}
	 
	 
}
